package com.liu.sx.service;

import com.liu.sx.dao.PayDao;
import com.liu.sx.entity.Pay;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

/**
 *  流量卡管理
 *
 */
@Service
@Transactional
public class PayService {

    @Autowired
    private PayDao payDao;

    public Page<Pay> findAll(int page,int rows ,String query){

        Pageable pageable = PageRequest.of(page,rows,Sort.Direction.DESC,"address");
        return payDao.findAll(query,pageable);


    }



}
